package araujoCoronelVillamayor.plantasVsZombies.domain

import java.io.Serializable

class FactoryZombies implements Serializable {
	static int zombieNumero
	static FactoryZombies factoryZombiesUnica

	private new(){
		zombieNumero = 0
	}

	def static FactoryZombies getInstance() {
		if (factoryZombiesUnica == null) {
			factoryZombiesUnica = new FactoryZombies()
		}
		factoryZombiesUnica
	}
	def Zombie crearColinBlunstone(){
		this.incrementarZombieNumero
		new Zombie("Zombie Colin Blunstone (#" + zombieNumero + ")", 1, 4)
	}
	
	def Zombie crearCranberrie(){
		this.incrementarZombieNumero
		new Zombie("Zombie Cranberrie (#" + zombieNumero + ")", 4, 1)
	}
	
	def incrementarZombieNumero(){
		zombieNumero = zombieNumero + 1		
	}
}